<?xml version="1.0"?>
<doc>
    <assembly>
        <name>MxAppToolbox</name>
    </assembly>
    <members>
        <member name="T:WillStott.MxAppToolbox.ToolbarOps">
            <summary>
            Summary description for ToolbarOps.
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.ToolbarOps.UpdateButtonState(System.Windows.Forms.ToolStrip)">
            <summary>
            Enable ToolStrip button according it's corresponding menu item state
            </summary>
            <param name="bar">ToolStrip containing the button</param>
        </member>
        <member name="M:WillStott.MxAppToolbox.ToolbarOps.SetMenuItemImages(System.Windows.Forms.ToolStrip)">
            <summary>
            Set MenuItem images from corresponding ToolStrip buttons
            </summary>
            <param name="bar">ToolStrip containing the buttons</param>
        </member>
        <member name="M:WillStott.MxAppToolbox.ToolbarOps.ButtonClick(System.Windows.Forms.ToolStripItemClickedEventArgs)">
            <summary>
            Pass click on Toolbar button to corresponding menu item
            </summary>
            <param name="e"></param>
        </member>
        <member name="T:WillStott.MxAppToolbox.Program">
             <summary>
             Your Windows Forms application must contain a class derived from Program to benefit from many
             of the facilities provided by MxAppToolbox. The Program class is used to create the single 
             instance of an object concerned with application wide features and information. Program is an 
             abstract class because it goes further than providing just an interface; it also supplies 
             implementation common to applications built using MxAppToolbool. Take the following steps to
             implement a MxAppToolbox enabled Windows Forms application after creating the Windows Forms C# project:
             <list type="number">
             <item><description>Rename Form1 as MainForm and cut the program entry point, static void Main()</description></item>
             <item><description>Create a class for the application, say TestWinApp, derive it from Program and paste the program entry point and make MainForm the class passed to Application.Run</description></item>
             <item><description>Supply the concrete classes for Program's defined abstract classes</description></item>
             <item><description>Provide the private and static constructor as well as Instance- see example</description></item>
             <item><description>Copy TestWinAppMsg.xml into project's src directory and add it to the project as an existing item. Set it's build action to embedded resource</description></item>
             <item><description>Implement ReadRegistryValues and WriteRegistryValues + support them in Options dialog</description></item>
             </list>
             <example>
             <code>
             
             System.Globalization;
             System.Reflection;
             System.Threading;
             
             public class TestWinApp : Program
            	{
            		private bool         m_MainFormClosing;
            		private UniMsgList   m_UniMsgList;
            		private UniLog       m_UniEventLog;
                 private bool         m_VerboseLog;
                 private string       m_helpFilePathName;   
            
            		private TestWinApp() {}
            		static TestWinApp()
            		{
            			try
            			{
            				Program.Instance = new TestWinApp();
            				TestWinApp.Instance.m_MainFormClosing = true;	//reset in MainFrom when it is open
            				
            				TestWinApp.Instance.m_UniEventLog = new UniLog();
                         TestWinApp.Instance.m_VerboseLog = true;
            				TestWinApp.Instance.m_UniEventLog.Name = "TestWinApp";
            			}
            			catch (Exception e)
            			{		//unless you end the program here a TypeInitializationException is thrown as the ctor failed
            				Program.FatalErrorAbend("TestApp.TestWinApp()", e.Message);
            			}
            		}
            		static public new TestWinApp Instance {	get { return Program.Instance as TestWinApp; }}
            		
                 public override bool	VerboseLog 
                 { 
                     get { return m_VerboseLog ; }
                     set { m_VerboseLog  = value;} 
                 }
             
            	    public override string HelpFilePathName 
            	    { 
            	        get { return m_helpFilePathName; } 
            	        set { m_helpFilePathName = value; } 
            	    }
             
            		public override UniLog AppLog {	get { return m_UniEventLog; }}
            		public override UniMsgList	ErrMsgs { get { return m_UniMsgList; }}	
             
            		public override bool MainFormClosing
            		{ 
            			get { return m_MainFormClosing; }
            			set { m_MainFormClosing = value; }
            		}
            		public override bool CloseAllDocuments(bool AllowCancel)
            		{
            			bool rc = true;
            			if ( (AllowCancel == true) AND (MessageBox.Show("Close now?", "Msg", MessageBoxButtons.YesNo) == DialogResult.No ))
            				rc = false;
            			return rc;
            		}
                 public override void MainArgProc(string[] args)
                 {
                     if (args.Length > 0)
                     {
                        if (args[0] == "/culture=DE")
                            Thread.CurrentThread.CurrentUICulture = new CultureInfo("de");
                     }
                     Assembly resAsm = Program.GetResourceAssembly(this);
                     MxStdApp.Instance.m_UniMsgList = UniMsgList.LoadList(resAsm, "TestApp.TestWinAppMsg.xml");
                     HelpFilePathName = Utils.GetPath(resAsm.Location) + "TestApp.chm";
                 }
             
                 [STAThread]
                 static void Main(string[] args)
                 {
                    MxStdApp.Instance.MainArgProc(args);
                    Application.Run(new MainForm());
                 }
             </code>
             </example>
             </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.MainArgProc(System.String[])">
            <summary>
            Process any arguments passed to the application. This is also where you must load
            the resource list for UniMsgs
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.GetResourceAssembly(System.Object)">
            <summary>
            Get the Assembly containing the resources. Depending on the CurrentUICulture this
            may be the main assembly (.exe) or a satellite assembly
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.ResetAllDocuments">
            <summary>
            Resets the application's documents
            </summary>
            <returns>True if all documents reset</returns>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.CloseAllDocuments(System.Boolean)">
            <summary>
            Closes the application's documents, saving them as necessary. This is called
            when the application is forcibly terminating and when the MainForm closes. It
            may also be invoked when the user chooses to exit the program.
            </summary>
            <param name="AllowCancel">Allow user to cancel operation</param>
            <returns></returns>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.TerminateApp(System.Boolean)">
            <summary>
            Invoked by application's error handling or when the user decides to close the Main window.
            The File | Exit action handler should invoke this method and put all closing
            operations in MainForm_Closing handler.
            </summary>
            <param name="KillProcess">Kill the process</param>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.ResetApp">
            <summary>
            Invoked by error handling to reset the application to a know state
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.GetFatalErrorAbendMsg">
            <summary>
            Override to provide an alternative message during FatalErrorAbend()
            </summary>
            <returns></returns>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.FatalErrorAbend(System.String,System.String)">
            <summary>
            FatalErrorAbend should only be invoked as a last resort - indicates the error handling is defective 
            or not yet initialised. Assuming something bad has happened, don't attempt to load message from resources
            </summary>
            <param name="Location">Where this method was invoked</param>
            <param name="Cause">The reason the method was invoked</param>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.UniHandler(System.Object,System.Threading.ThreadExceptionEventArgs)">
            <summary>
            Exception handler for application's thread
            </summary>
            <param name="sender">object causing exception</param>
            <param name="args">arguments for exception</param>
        </member>
        <member name="M:WillStott.MxAppToolbox.Program.Log(System.String,System.Object[])">
            <summary>
            Write message to application event log
            </summary>
            <param name="fmt">Format string</param>
            <param name="args">arguments</param>
        </member>
        <member name="P:WillStott.MxAppToolbox.Program.AppLog">
            <summary>
            Get the UniLog object for logging facilities
            </summary>
        </member>
        <member name="P:WillStott.MxAppToolbox.Program.VerboseLog">
            <summary>
            Get, Set the verbose log flag. When set calls to Log() will result in an entry being
            made in the application event log.
            </summary>
        </member>
        <member name="P:WillStott.MxAppToolbox.Program.MainFormClosing">
            <summary>
            Get, Set the flag to indicate when the MainForm is closing. It is set true at startup when
            Program.Instance is being set. It is set false by IMxDlgForm event handler when the MainForm has loaded. 
            This flag is used in Program.TerminateApp to decide whether or not to terminate the application
            by closing its Main Window.
            </summary>
        </member>
        <member name="P:WillStott.MxAppToolbox.Program.ErrMsgs">
            <summary>
            Get the UniMsgList object for message support
            </summary>
        </member>
        <member name="P:WillStott.MxAppToolbox.Program.HelpFilePathName">
            <summary>
            Get the fill filename and path for the application help file. Typically it is the same
            directory as .exe, but may also be in foreign language sub directory
            </summary>
        </member>
        <member name="P:WillStott.MxAppToolbox.Program.Instance">
            <summary>
            Provide access to the application's single instance object from the derived class, say TestWinApp, 
            and from any classes within MxAppToolbox.
            </summary>
        </member>
        <member name="T:WillStott.MxAppToolbox.DlgUtils">
            <summary>
            DlgUtils contains a collection of methods that are useful when 
            implementing dialog boxes
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.DlgUtils.RemoveSelectedItemFromListBox(System.Windows.Forms.ListBox,System.Int32)">
            <summary>
            Removes selected item from a list box and selects the next item
            </summary>
            <param name="box">List box</param>
            <param name="lastRemovedItem">Set to -1, only used during recursion</param>
            <returns>index of last item removed</returns>
        </member>
        <member name="M:WillStott.MxAppToolbox.DlgUtils.GetAllControls(System.Windows.Forms.Form)">
            <summary>
            Gets a lists of the all controls found in dlg, not just top level 
            but controls within controls
            </summary>
            <param name="dlg">Form containing controls</param>
            <returns>array of controls found in dlg</returns>
        </member>
        <member name="M:WillStott.MxAppToolbox.DlgUtils.ShowHelp(System.Windows.Forms.Form,System.String,System.Windows.Forms.HelpEventArgs)">
            <summary>
            Opens HTML Help at topic for dialog box and at bookmark associated with the 
            control that was active when user pressed F1 or the control the user clicked
            when mouse pointer is in help mode. Usually called from the dialog's HelpEventHandler
            <seealso cref="M:WillStott.MxAppToolbox.IMxDlgForm.HelpRequest(System.Object,System.Windows.Forms.HelpEventArgs)"/>
            </summary>
            <param name="form">Dialog object</param>
            <param name="HelpTopic">Name of Help Topic</param>
            <param name="e">Event object</param>
        </member>
        <member name="T:WillStott.MxAppToolbox.UniException">
            <summary>
            Summary description for Class1.
            </summary>
        </member>
        <member name="T:WillStott.MxAppToolbox.UniLog">
            <summary>
            Summary description for UniLog.
            </summary>
        </member>
        <member name="T:WillStott.MxAppToolbox.IMainForm">
            <summary>
            Interface for standard Main Form with Toolbar and Statusbar support.After creating
            the application's main form, do the following:
            <list type="number">
            <item><description>Insert statement, using MxAppToolbox</description></item>
            <item><description>Set AccessibleName - MainWindow</description></item> 
            <item><description>Set AccessibleDescription - TestApp main window containing menu, toolbar and views</description></item>
            <item><description>Set Text as Application's name</description></item>
            <item><description>Set Application's icon</description></item>
            <item><description>Add Menu Strip, Status Bar Strip, Toolbar Strip from toolbox</description></item>
            <item><description>Add Menu items to Menu and use ampersand in text for mnemonic</description></item>
            <item><description>Add images (GIF, 16 x 16 or BMP) to Toolbar Strip + give a tooltip</description></item>
            <item><description>Set Toolbar and Statusbar AccessibleName, Descriptions</description></item>
            <item><description>Add Event handler for Toolbar Strip Button Click - toolStripMain_ItemClicked</description></item>
            <item><description>Set Tab order (View | Tab Order)</description></item>
            <item><description>Add Events for MainForm opening and closing and set them as public</description></item>
            <item><description>Add IMainForm interface to class definition and implement the other methods defined by this interface</description></item>
            </list>
            IMainForm works in conjunction with the application's class which is derived from Program in main.cs
            <seealso cref="T:WillStott.MxAppToolbox.Program"/> 
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.IMainForm.UpdateFormUI">
            <summary>
            This method updates the user interface and is invoked whenever the main window's content 
            changes. For example; Form Ctor, View | Statusbar, View | Toolbar, Document change 
            <example>
            <code>
            public MainForm()
            {
            	InitializeComponent();
            	InitToolbar();
                ToolbarOps.SetMenuItemImages(toolStripMain);
            	UpdateFormUI();
            }
            public void UpdateFormUI()
            {
            	ToolbarOps.UpdateButtonState(toolStripMain);
            	//resize windows in case toolbar or status window are toggled
            }
            </code>
            </example>
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.IMainForm.InitToolbar">
            <summary>
            Links the Toolbar to the Menu items. Invoked from the MainForm constructor.		
            <example>
            <code>
            public void InitToolbar()
            {
            	toolStripButtonToolsOptions.Tag = toolsOptionsToolStripMenuItem;
            	...
            }
            </code>
            </example> 
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.IMainForm.toolStripMain_ItemClicked(System.Object,System.Windows.Forms.ToolStripItemClickedEventArgs)">
            <summary>
            Event handler for user clicking a toolstrip button
            <example>
            <code>
             public void toolStripMain_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
            {
            	ToolbarOps.ButtonClick(e);
            }
            </code>
            </example>
            <seealso cref="M:WillStott.MxAppToolbox.ToolbarOps.ButtonClick(System.Windows.Forms.ToolStripItemClickedEventArgs)"/> 
            </summary>
            <param name="sender"></param>
            <param name="e"></param>
        </member>
        <member name="M:WillStott.MxAppToolbox.IMainForm.MainForm_Load(System.Object,System.EventArgs)">
            <summary>
            Event handler for Form opening
            <example>
            <code>
            public void MainForm_Load(object sender, System.EventArgs e)
            {
            	TestWinApp.Instance.MainFormClosing = false;
            }
            </code>
            </example>
            </summary>
            <param name="sender"></param>
            <param name="e"></param>
        </member>
        <member name="M:WillStott.MxAppToolbox.IMainForm.MainForm_Closing(System.Object,System.Windows.Forms.FormClosingEventArgs)">
            <summary>
            Event handler for Form closing
            <example>
            <code>
            public void MainForm_Closing(object sender, System.Windows.Forms.FormClosingEventArgs e)
            {
            	if ( TestWinApp.Instance.CloseAllDocuments(true) == false)
            		e.Cancel = true;
            }
            </code>
            </example>
            </summary>
            <param name="sender"></param>
            <param name="e"></param>
        </member>
        <member name="T:WillStott.MxAppToolbox.UniMsgDlg">
            <summary>
            Summary description for UniMsgDlg.
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.UniMsgDlg.Dispose(System.Boolean)">
            <summary>
            Clean up any resources being used.
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.UniMsgDlg.InitializeComponent">
            <summary>
            Required method for Designer support - do not modify
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="T:WillStott.MxAppToolbox.IMxDlgForm">
            <summary>
            Interface for standard dialog box with Help Support. After adding the new Windows
            Form class to your project make the following changes:
            <list type="number">
            <item><description>Set dialog's Accessibility Name and Description. Leave Role as default unless the dialog's role is different to normal.</description></item>
            <item><description>Create a Help topic for the dialog box, say "options.htm" and
            add bookmarks for sections relating to controls in dialog, say "name", "address". Document
            how dialog is accessed from keyboard only</description></item>
            <item><description>Set Help button property true</description></item>
            <item><description>Set Minimize and Maximise button property false</description></item>
            <item><description>Set ShowInTaskBar property false</description></item>
            <item><description>Add Event Handler for HelpRequested as HelpRequest</description></item>
            <item><description>Set Tab order for form ( View | Tab Order)</description></item>
            <item><description>If you change the Background or Foreground colors provide support for High Contrast mode</description></item>
            <item><description>Do not set Font sizes to less than 10 pts</description></item>
            <item><description>Do not use Sound alone to convey important information to user</description></item>	 
            </list>
            When adding controls to the form specify the following properties:
            <list type="number">
            <item><description>Set Accessibility Name as same name used for the bookmark in the help topic.</description></item> 
            <item><description>Give Accessibility Description. </description></item>
            <item><description>Leave Accessibility Role as default unless control's role is different to normal.</description></item> 
            <item><description>Set Tooltip text</description></item>
            <item><description>Add ampersand to Text property for keyboard access or add ampersand to preceding Label's 
            text property and set its UseMnemonic propert true</description></item>
            <item><description>Add OK and Cancel buttons and set their DialogResult properties to OK and Cancel
            also set the Dialog box property AcceptButton and CancelButton</description></item>
            </list>
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.IMxDlgForm.HelpRequest(System.Object,System.Windows.Forms.HelpEventArgs)">
            <summary>
            Add Event Handler for HelpRequested as HelpRequest
            <example>
            <code>
            public void HelpRequest(object sender, System.Windows.Forms.HelpEventArgs hlpevent)
            {
            	DlgUtils.ShowHelp( this, "Options.htm",  hlpevent);
            }
            </code>
            </example>
            <seealso cref="M:WillStott.MxAppToolbox.DlgUtils.ShowHelp(System.Windows.Forms.Form,System.String,System.Windows.Forms.HelpEventArgs)"/>
            </summary>
            <param name="sender">Object that generated event</param>
            <param name="hlpevent">Info about event</param>
        </member>
        <member name="T:WillStott.MxAppToolbox.ProcessOps">
            <summary>
            Summary description for ProcessOps.
            </summary>
        </member>
        <member name="T:WillStott.MxAppToolbox.MenuOps">
            <summary>
            Summary description for MenuOps.
            </summary>
        </member>
        <member name="M:WillStott.MxAppToolbox.MenuOps.ToggleShow(System.Windows.Forms.Control,System.Windows.Forms.ToolStripMenuItem)">
            <summary>
            Switch control between visible and invisible then update the corresponding menu item
            </summary>
            <param name="ctrl">control to be set visible or not</param>
            <param name="menu">menu item to show visibility of control</param>
        </member>
        <member name="M:WillStott.MxAppToolbox.IMxDocument.IsDirty">
             <summary>
             Interface for Document to support a Model-View-Controller architecture. This doesn't make
             sense unless you have several views operating on a common document. After adding
             the new document class to your project (e.g. MxStdAppDoc) make the following changes:
             <list type="number">
             <item><description>add interface IMxDocument and implement its methods - see IsDirty()</description></item>
             <item><description>define delegate to handle change events and create a public event of this type in your document class i.e. docChange</description></item>
             <item><description>add properties for the things you want to store in your Document object</description></item>
             <item><description>in each property's setter create a MxDocChangeEventArgs object and pass it to your event i.e. docChange(e)</description></item>
             <item><description>Implement the observer in your view class i.e. MainForm</description></item>
             </list>
             <example>       
             <code>
                 public delegate void MxStdAppDocEventHandler(MxDocChangeEventArgs e);
            
                 public class MxStdAppDoc : IMxDocument
                 {
                     public event MxStdAppDocEventHandler docChange;
                     private bool dirtyFlag;
                     private string text;
            
                     public MxStdAppDoc()
                     {
                         dirtyFlag = false;
                     }
            
                     private void DocChangeEvent(MxDocChangeEventArgs e)
                     {
                         if (docChange != null)
                         {
                             dirtyFlag = (e.ChangedItemLabel == @"DirtyFlag") ? false : true;
                             docChange(e);
                         }
                     }
            
                     public bool IsDirty()
                     {
                         return dirtyFlag;
                     }
            
                     public string Text
                     {
                         get { return text; }
                         set
                         {
                             text = value;
                             DocChangeEvent(new MxDocChangeEventArgs(@"Text", value));
                         }
                     }
            
                     public void Save()
                     {
                         DocChangeEvent(new MxDocChangeEventArgs(@"DirtyFlag", false));
                     }
                 }
             </code>
             </example>
             <list type="number">
             <item><description>add interface IMxDocument and implement its methods - see IsDirty()</description></item>
             </list>
             <example> 
             <code>
                 public partial class MainForm : Form , IMainForm
                 { 
                     public MainForm()
                     {
                         MxStdApp.Instance.Document.docChange += new MxStdAppDocEventHandler(DocumentChange);
                         fileSaveToolStripMenuItem.Enabled = false;
                         ....
                     }
                    public void DocumentChange(MxDocChangeEventArgs e)
                     {
                         if (e.ChangedItemLabel == @"DirtyFlag")
                             fileSaveToolStripMenuItem.Enabled = false;
                         else
                             fileSaveToolStripMenuItem.Enabled = true;
                         UpdateFormUI();
                     }
                     private void textBoxTest_TextChanged(object sender, EventArgs e)
                     {
                         MxStdApp.Instance.Document.Text = textBoxTest.Text;
                     }
                     private void fileSaveToolStripMenuItem_Click(object sender, EventArgs e)
                     {
                         MxStdApp.Instance.Document.Save();
                     }
             </code>
             </example>
             </summary>
             <summary>
             Implement method to determine whether the document has been changed and so needs
             saving
             </summary> 
        </member>
    </members>
</doc>
